package com.cjj.factory;

/**
 * @ClassName FactoryMain
 * @Date 2021/07/28 17:10:13
 * @Created by ccc-j
 * @email ccc-ju@outlook.com
 */
public class FactoryMain {

    public static Car createCar(String carType){
        Car car = null;
        switch (carType){
            case "奥迪":
                car = new AuDi();
                break;
            case "奔驰":
                car = new BenCi();
                break;
            default:
                car = new BenCi();
                break;
        }
        return car;
    }


}
